<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap 101 Template</title>


    <!-- Bootstrap -->
    <!--<link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">-->
    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap.css">

    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/comunity.css">


    <script src="bootstrap-3.3.7-dist/jquery-3.3.1/jquery-3.3.1.min.js"></script>

    <script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>


    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <!--<script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>-->
    <![endif]-->
</head>
<body class="Public-body">
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">麻将社区</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

            <form action="/public" class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="搜索问答">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li th:if="${session.user==null}"><a
                        href="https://gitee.com/oauth/authorize?client_id=085212331519abc0b94ce2ad1fa3380e176a45dabab74617b424fc7a343e1998&redirect_uri=http://localhost:8080/callback&response_type=code&state=1">登录</a>
                </li>
                <li th:if="${session.user!=null}">
                    <a href="/public">发布</a>
                </li>
                <li class="dropdown" th:if="${session.user!=null}">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false" th:text="${session.user.getName()}"> <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">个人中心</a></li>
                        <li><a href="#">消息中心</a></li>
                        <li><a href="#">退出登录</a></li>

                    </ul>
                </li>
            </ul>
        </div>
    </div>


</nav>

<div class="container-fluid main">

    <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
        <h2><span class="glyphicon glyphicon-plus" aria-hidden="true"></span>发起问题</h2>
        <hr>

        <form action="/public" method="post">
            <div class="form-group">
                <label for="title">问题标题（简单扼要）</label>
                <input th:value="${title}" type="text" class="form-control" name="title" id="title"
                       placeholder="问题标题....">
            </div>

            <div class="form-group">
                <label for="title">问题补充（必填， 请参考右侧提示）</label>
                <textarea th:text="${description}" cols="30" rows="10" name="description" class="form-control"
                          id="description"></textarea>

            </div>
            问题标题....
            <div class="form-group">
                <label for="title">添加标签</label>
                <input th:value="${tag}" type="text" class="form-control" name="tag" id="tag"
                       placeholder="输入标签，以逗号隔开分割....">
            </div>


            <div class="alert alert-danger" role="alert" th:if="${msg!=null}" th:text="${msg}"></div>
            <button type="submit" class=" btn btn-success btn">发布</button>


        </form>

    </div>
    <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
        <h3>问题发起指南</h3>
        • 问题标题: 请用精简的语言描述您发布的问题，不超过25字 <br>
        • 问题补充: 详细补充您的问题内容，并确保问题描述清晰直观, 并提供一些相关的资料<br>
        • 选择标签: 选择一个或者多个合适的标签，用逗号隔开，每个标签不超过10个字<br>

    </div>
</div>
</body>
</html>